@extends('back.index')
@section('title','课程管理')

@section('style')

@endsection
@section('mian')
    <div style="font-size:14px;padding:20px;" class="modal-content">
        <div class="my-order-wrap">
            <table class="table table-hover my-order-list" data-token="b85c364572f96a34c7a2e04eeee935e4">
                <thead>
                <tr class="info" style="text-align:center;">
                    <th class="order-shoop-h">反馈编号</th>
                    <th class="order-name-h">用户id</th>
                    <th class="order-img-h">问题概括</th>
                    <th class="order-name-h">问题内容</th>
                    <th class="order-name-h">反馈时间</th>
                    <th class="order-name-h">状态</th>
                    <th class="order-name-h">操作</th>
                </tr>
                </thead>
                <tbody>
                @if(!empty($order))
                    @foreach($order as $k)
                        <tr>
                            <td class="order-time-b">
                                <div class="ie8-td-fixed">
                                    <div style="height:100px;">
                                        {{$k->id}}
                                    </div>
                                </div>
                            </td>
                            <td class="order-time-b">
                                <div class="ie8-td-fixed">
                                    <div style="height:100px;">
                                        {{$k->readid}}
                                    </div>
                                </div>
                            </td>
                            <td class="order-time-b">
                                <div class="ie8-td-fixed">
                                    <div style="height:100px;">
                                        {{$k->up}}
                                    </div>
                                </div>
                            </td>
                            <td class="order-time-b">
                                <div class="ie8-td-fixed">
                                    <div style="height:100px;">
                                        {{$k->num}}
                                    </div>
                                </div>
                            </td>
                            <td class="order-time-b">
                                <div class="ie8-td-fixed">
                                    <div style="height:100px;">
                                        {{date('Y-m-d',$k->addtime)}}
                                    </div>
                                </div>
                            </td>
                            <td class="order-time-b">
                                <div class="ie8-td-fixed">
                                    <div style="height:100px;">
                                    @if($k->in)
                                        已回复 &nbsp;&nbsp;<b id="gofe" style="cursor: pointer">查看回复<input type="hidden" value="{{$k->id}}" ></b>
                                        @else
                                        未回复
                                        @endif
                                    </div>
                                </div>
                            </td>
                            <td class="order-time-b">
                                <div class="ie8-td-fixed">
                                    <div style="height:100px;">
                                        @if(empty($k->in))
                                        <a href="{{url('back/infeedback/'.$k->id)}}">回复</a>
                                        @endif
                                            &nbsp;&nbsp;&nbsp;<a href="{{url('back/delfeed/'.$k->id)}}">删除</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    @endforeach
                    @endif
                <script>
                    $(function(){
                        $(this).on('click','#gofe',function(){
                            $id=$(this).children('input').val();
//                            alert($id)
                            $.ajax({
                                url:"{{url('back/gofe')}}",
                                data:'id='+$id,
                                type:'get',
                                success:function(data){
                                    alert(data)
                                },
                                error:function(){
                                    alert('出错啦请联系管理员')
                                },
                                datatype:'text'
                            })
                        })
                    })
                </script>
                </tbody>
            </table>
            {{$order->links()}}
        </div>
    </div>
@endsection